Is it a good idea to get involved with journals as an associate editor prior to getting tenure?
I think my first recommendation would be, do not see editorship primarily as a career move/booster (if it ever is). Become an editor if you enjoy that side of the publishing and you think you have something to contribute. I had some opportunities with editing conference proceedings and thematic issues which gave me the insight that I really enjoyed working on that side of publishing (along with my research, admin, students etc,).

Signing up to be an editor is a longer term commitment. You need to check with the journal if they have a "from now on" or fixed periods for editors. You should probably expect to be involved for, say, three years under most circumstances. You should also check the expected work load in terms of, say, papers per year (but expect the workload to vary significantly over shorter time periods).

Being an editor can be very fruitful since it may give you new impulses on scientific writing and thinking and other similar aspects that can help your own development. As an editor, you will perhaps also gain some reputation, your name will be seen in amongst hopefully respectable peers (the other editors). Not that this may be of direct importance in terms of tenure or so but it may develop your network of contacts. There are many positives that follow from serving as editor, in my opinion, and it will be up to you to take the opportunity to serve as a fair and sound editor. There are no doubt tricky issues concerning ethics that will pass your desk but solving such issues together with other editors is a good and useful learning experience. 

So in the end, become an editor because you want to, the chore will take time from your other duties and you need to be prepared to provide that time on top of everything else over a longer period. As you become seasoned, the time you need to spend on each paper diminishes somewhat so initially, you may find the time consumption larger than expected.

EDIT: I guess my point is that the editorial work takes time and effort but is also rewarding on a personal level (how, is personal). How this spills over into your situation in terms of meriting is for you to assess. Does your workplace appreciate such efforts? If you really want to do it, will the opportunity arise again any time soon? Are you willing you sacrifice some spare time if need be, and over some longer term? Clearly it should not reduce your other activities that are meriting for your career (research, publishing, teaching supervising etc.) so you need to balance between your own interest and what you need to do. That is why assessing how much time will be required(on average) is a good starting point.

My personal view throughout my early career was to jump at opportunities that I felt strongly about and where I could see something good coming out at the other end. By good I mean both for myself or for my career. I figured, the only thing I had to invest was my time and I needed to invest it wisely to help me get a permanent position but also to do things I really liked. So on the whole, quite egotistical, but then I have not been much for spending much effort on stuff I did not like or saw a point in. Of course one cannot jump at everything without the risk of hitting the wall. So, in the end, I think it is your interest and time keeping that decides. What you engage in can be either directly rewarding or indirectly so, and as long as it provides a positive, I think it is worth considering.