Bikeshops tend to like a spray lube called GT85 these days. It's terrific stuff and also works as a polish for bike frames - and it smells of new car! Definitely don't use WD40, as it isn't really a lube. Also: keeping a chain clean is as or more important than keeping it lubed, at least if the dirt getting in there is abrasive. Bike chains should be removed and soaked in citrus degreaser every so often - but they have hard lives exposed to the weather, grit, etc.
If you prefer lithium grease (it usually lasts longer) you can get in spray form as well as solid - e.g search for SG85.