I spent a month in March 1989 driving along the Mediterranean coast of Spain, staying at small hotels along the way. I didn't have plan - if I liked a place I would stay there a few days. Then I had to quit my job to get travel time, now with remote internet working "from home" you can work while you travel. Here are some travel tips for longer term travel doing remote internet based work based on both that trip and many I have made around the world since then.
While I mention Spain a few times below, most of this advice applies to all countries.
At the time it was not aways easy to find a working ATM, especially in small towns. Not sure if that has changed. So I recommend you have some Euros and dollars as back up when traveling. Also recommend you have several ATM and credit cards because sometimes your bank will cancel your card due to "suspicious activity" which is really just you spending money abroad. They will do this even if you tell them by phone ahead of time of your travel plans. So some back up cards come in handy while you wait for you bank to either reinstate your card or FedEx you a replacement. I have read that some automated ticket machines in Europe don't like US credit cards (except for Amex) because they want to see a chip on the card. More on that here
I recommend you scan all your passports, IDs, cards, tickets etc and put in a secure, password protected place such as Evernote so you can access them if you loose any originals. And put a backup card and cash in a separate place in case your main stash is stolen. Keep an eye on bags at all times. Do not assume that a hotel room is 100% safe. 99% of the time all is fine and people are honest but it makes sense to be safe.
I would recommend figuring out your backup strategy in case your laptop is stolen. I use a USB external drive plus an internet backup solution. And I encrypt my data using TrueCrypt. I also bring a laptop cable lock to prevent casual walk in thieves from walking away with my laptop. With 25% unemployment in Spain I would not recommend flashing expensive computers, cameras or jewelry around. And in the event you see any riots or protests I recommend walking the other way no matter how interesting they appear.
Computers and phones
I think you will find wifi in most places. I imagine it is free but not sure. I have found my Boingo account useful at airports and other places where I would otherwise have to pay for wifi (about $10 per month). Your computer power adapter will work with the 220 V electricity in Europe but you might check any other electronics that you bring with you - sometimes they are 110 V only and plugging them in will short them out and smell bad! A mini US power strip can be handy if you have several items to charge and then you only need one power adapter to plug the power strip into the wall.
It is a lot cheaper to get a local SIM chip for your (unlocked quad-band) phone or buy a local phone rather than using roaming which can easily add up to thousands of dollars in voice and data fees. Skype is great too and they have a flat rate plan for calls in US and many other countries.
Costs and housing
I have read that it is pretty expensive in Madrid with high prices and 20% VAT (sales tax), so you might want to get out in the countryside. If you are going to stay in one place for a month or more it will be cheaper to rent an apartment. You will get a better price if you can enlist a local to help call the ads in the paper. Not all places are advertized on the internet, so this is best done on the ground once you are there. Another way to get free housing is to do a house swap with a local who wants to live in your house - there are several websites for this kind of thing. House sitting is another way to score free housing.
I am pretty sure you can enter Spain on US passport and get 90 day tourist visa entry. You can probably visit another country after that and get another 90 days if you desire. Don't tell the immigration people that you plan to work while you are abroad- it only causes excitement and might get you barred from entering the country. And in truth you are working in USA while you travel. Just say you are tourist if asked.
While many people will speak English you will find many people who do not, especially outside of big cities. So some Spanish will come in handy. You can get a Spanish-English dictionary and phrase book for your phone or a paperback works well too.
Traveling light and resources
The less stuff you carry the easier your trip will be - most items can be bought abroad if you really find out you need them.
The travel stack exchange is good for researching and asking travel questions I recommend reading the 4 hour work week and Vagabonding on traveling light longer term travel. Those resources and more here.