Exposing the battery to high temperatures and keeping the battery fully charged for extended periods (therefore keeping the Lithium-ion cells at maximum voltage and at high current) are the main factors which can decrease the overall battery life (that is, the overall useful capacity or run-time).
For a typical fully charged Lithium-ion battery, storing it at 40°C would result in around 35% capacity loss after 1 year, whereas storing it at 25°C would result in only around 20% of capacity loss after 1 year.
Lithium-ion batteries consist of multiple cells. Typical Manganese chemistry type Lithium-ion batteries have a maximum voltage limit of 4.20V per cell, achieved when the battery is at 100% state of charge (fully charged). At 40% state of charge, the cells are at around 3.75V.
At 25°C, storing the battery at 100% state of charge will result in around 20% capacity loss after 1 year, whereas storing the battery at 40% state of charge (at the same temperature) will result in only around 4% capacity loss after 1 year.
Personally, I keep my battery in my laptop most of the time, and leave the power adapter connected. My laptop doesn't dissipate much heat, and I need to ensure that my battery is fully charged since I'm always using it for long periods on the go. In addition, keeping the battery inserted means I won't be affected by a power cut (effectively an Uninterruptible Power Supply). To add, it's easy to pull out the power adapter from my laptop, and there's been many occasions where I've experienced sudden loss of power due to the power cable being accidentally tugged free (very annoying especially when you haven't saved your work in your current session).
About the concern over the dangers of a power surge, battery inserted or no battery inserted, so long as a power adapter is connected from your power outlet to your laptop, your laptop is at risk from being damaged from a power surge. Therefore, as with all powered devices, it's advised not keep your laptop connected to a power outlet during a thunderstorm.
I should also clarify that Li-ion batteries don't trickle charge like Ni-MH battery do. Instead, a topping charge is performed when the capacity is low. A typical fully charged manganese chemistry type Lithium-ion battery (where cells are at typical 4.20V) will charge again after 20 days (when the cells drop to around 4.00V).
Hyperzone! - Power That Laptop!
Welcome to Battery University