I would amend the attachment on Peregrina2000's message a bit. 1) The Hostal Bayona in La Panadella gives a pilgrim rate. 2) The albergue in Linyola often has agricultural workers staying there--- when you call, you will find out if this is the case at the time. Two other alternatives in the pueblo, Habitaciones Piñol, where a very basic room cost me 15€ in 2007, and a posh but very comfortable casa rural, Cal Rotes, where I was able to get a midweek rate of 50€ after some discussion--- the spa is extra. 3) Alfarras has an inexpensive hostal, la Florida, opposite the parish church-- 18€ in 2007, with a warm and helpful owner, and a cheerful staff. 4) A room at the Fonda Galindo in Tamareite de Litera only cost 18€ in 2007, although it's likely more expensive now. 5) In La Bolea, Casa Ruffino offers both reasonable rooms (18€ in 2009) and also manages a small albergue-- I think that the price was 6€). 6. Loarre, there is a camping just 2km north of the pueblo, on the way to the Castillo, with more reasonable accommodation than can be found in Loarre itself.
But these are just quibbles in an otherwise useful document.
I cannot sufficiently underline Margaret Meredith/mspath's comments about San Juan de la Pena--- it is one of the top travel experiences of my life, and made 3 weeks of stomping through dusty Catalonia and Aragon well worth it. We could not understand the maestro's work before Picasso. It is unspeakably extraordinary.