I am unsure if I adequately understand the concept of first electronic rights. If I post a story on a writers' website for free but also publish it through Amazon, will it affect me?
The Amazon agreement says: "You grant to each Amazon party, throughout the term of this Agreement, a nonexclusive, irrevocable, right and license to distribute Digital Books, directly and through third-party distributors, in all digital formats by all digital distribution means available".
That means you can also distribute your digital book through other media - free or paid - what includes a a free writing website. In legal terms of exclusivity, it won't affect you.
On the other hand. a lot of people will have access to your content freely and may not be willing to pay for it. Of course there are a lot of people who choose such an approach, appealing to those who like the content to buy it or donate money as support.
That will affect you, but not necessarily in a bad way.
It's hard to say if offering the book for free will make you earn or lose money. It depends on a lot of things and, especially for a not well known writer, it may mean profits.
In general, "First [X] Rights" means "the right to be the first person/entity to do [X]," or "...to publish this piece in format [X]."
"First Electronic Rights" means first publication in a digital format. In this context, emailing a copy to your best friend isn't publication, but posting it on a publicly-accessible site (e.g. your blog, or a writers' website) is; publishing as an ebook available on Amazon certainly is. In general, as soon as you post or sell your story in any public venue online, you no longer have any First Electronic Rights to sell.
That being said, not having First Electronic Rights doesn't mean you don't have any Electronic Rights - they're just not first anymore. They'll likely still have value, particularly if you can eliminate the "first" source of publication, which lets you provide exclusivity. There's lots and lots of things you can do with Electronic Rights - it's so broad, that it's a good idea to negotiate very clearly on specific projects rather than the catch-all "electronic rights."
Note, also, that publishing digitally can also been seen as "taking" other rights, particularly First Serial rights - having published something online can make publishing it in print less attractive; it's no longer the "first" publication of the work.
All this being said, rights are negotiated over, and the precise degree to which you're likely to be able to sell any one right or a combination thereof (and for how much!) depends heavily on your particular piece and situation.