If it's not financially successful, it won't last long, unless, in the case of BSG they were willing to take the loss in order to gain the prestige for keeping the show on the air long enough for it to play out.
The ratings certainly declined over the life of the show, but I'd say they were at perfectly fine levels for a basic cable network like SyFy until the second part of the third season (you can see a chart of the series' ratings here
By that point NBC/Universal (which paid for the series and, importantly, is also the parent company of the SyFy Channel) had already paid for most of the series, and it made financial sense to finish it so that the studio could have a complete product to sell in ancillary markets.
Critical acclaim likely helped with the series renewal, but ancillary markets, not acclaim, was probably the decisive factor in the show receiving a fourth and final season. (The fact that they shot additional footage for the sole purpose of inclusion on home video more and more as the series progressed indicates how important ancillary markets were to NBC/Universal).
I'll have to admit, I didn't watch the show much when it was broadcasted, instead I bought the DVDs for all the shows and Caprica, it is easier to appreciate the individual episodes when they are viewed in order, because the combine to tell a single story. Its hard to enjoy an episode without knowing what went on before, and if you miss an episode, you sort of lose incentive to watch the next one, because seeing the next episode would tend to spoil the plot for the previous episode, that might in part explain the Nielsen ratings decline, the other thing is, it is sometimes hard to tell who the good guys are, you don't know whether your getting the "good Kara" or the "bad Kara" that likes to torturer Cylons. The first big turn off of the show was in the Miniseries when Six decided to kill a baby. I have to be careful when I watch that show because I have children.