Have window locks fitted, a chain on the door, and always
lock up whether you're in or out. Especially round the
back of the house.

Always check identification of service callers (gas,
electricity and so on), and don't open the door to
strangers.(My elderly neighbour was robbed twice - once
by two blokes claiming to be from the Water Board, and
again by someone claiming to be from an animal charity)

Don't list your female-sounding first name in the phone
book. Or on your door bell.

Generally:

A purposeful and confident air is good protection when
walking alone. If you are followed, walk up to a house
and ring the doorbell. If necessary, break a window.

Avoid unlighted areas. Keep doorways and landings well
lit. If you have to walk down a dark street, walk in the
centre of the road, away from doorways and parked cars. (Obviously,
avoid getting run over..)

Avoid fumbling for keys at the door - have them in your
hand as you arrive.

If you know you might be coming home alone at night, always
wear clothes and shoes you can run in.
Change before you leave, if necessary.

On buses: sit as near the driver as possible. On trains,
avoid empty carriages.

Try to make sure you have enough money for a taxi if you
know you might have to go home alone. Alternatively, make
sure you know the times of trains and buses, or have
planned out the safest possible walking route. Be
prepared - yup, very Boy Scout, but very sensible
and possibly life-saving.