Linlithgow is a small town and can be considered very safe, there are no run down no-go areas like in bigger cities.
Common sense should be observed when drinking in pubs, it is advisable not to loiter outside at closing time, especially outside code as alcohol fueled fighting is not uncommon amongst young men.