Is there a difference between these two sentences
昨日はビールを飲んでパイを食べました。
昨日はビールを飲みパイを食べました。
More generally, when should I choose one form over the other?
EDIT:
So it seems my original answer was incorrect. For the semantics of ~て linkage, please see this article (many thanks to @snailboat).
Regarding the actual question, I believe verb stems and ~て are very similar (perhaps interchangeable) in terms of semantics. However, according to my textbook (titled Tobira: Gateway to Advanced Japanese Learning through Content and Multimedia) and Kyle's answer, the verb stem is associated with formality and as such, it is more often seen in formal writing.
If you would like to imply or emphasize the ordering of a sequence of activities, a ~てから construct can be used (there are other options too).
朝【あさ】ご飯【はん】を食【た】べてテレビを見【み】ました。
"subject ate breakfast and watched TV. (in no particular order)"
朝【あさ】ご飯【はん】を食【た】べテレビを見【み】ました。
"subject ate breakfast and watched TV. (in no particular order)"
朝【あさ】ご飯【はん】を食【た】べてからテレビを見【み】ました。
"after eating breakfast, subject watched TV."
Original (Incorrect!) Answer
The first sentence:
昨日はビールを飲んでパイを食べました。
implies that you drank beer, and then ate pie.
On the other hand, the second sentence:
昨日はビールを飲みパイを食べました。
does not imply anything about the order in which you performed the two actions. It could be translated as "drank beer and ate pie", or "ate pie and drank beer".
In other words, using ~て to join sentences implies temporal ordering. As a result, it is usually used to convey a sequence of actions, whether they take place in the past, present, or future.
See this answer
The conjunctive form (aka pre-ます form) sounds more dry/learned/erudite/scholarly/formal. I hate all of those adjectives to describe it, but I think you know what I mean. It's of a higher register than the て form.