It's very simple to get a SIM card for a pay-as-you-go plan from Phone House or other phone store. There are a number of electronics stores on Klarabergsgatan across from the big Ahlens, or in Gallerien or even in Stockholm Central (train station). The cheapest plan/provider is COMVIQ, which was recommended by a friend and by the clerk at the store. But beware Comviq if you plan travel in rural areas because their coverage is somewhat limited.
This page shows coverage by the different Sweden providers (click on "Coverage map" under each provider).